import React, { Component } from 'react'

const detailData = [
  {id:"1", content:"001"},
  {id:"2", content:"002"},
  {id:"3", content:"003"},
]

export default class Messages extends Component {
  render() {
    const {id, title} = this.props.match.params
    const findResult = detailData.find((detailObj)=>{
      return detailObj.id === id
    })
    return (
      <div className='messages'>
        <ul>
          <li>ID: {id}</li>
          <li>TITLE: {title}</li>
          <li>CENTENT: {findResult.content}</li>
        </ul>
      </div>
    )
  }
}
